package fr.afcepf.atod18.hotels.utilitaires;

import java.util.ArrayList;
import java.util.List;

import javax.faces.model.SelectItem;

public class Item {
	
	private int idOption;
	private String name;
	private Double prix;
	
	// private int capaciteChambre;
	private int selectedQuantite;
	
	List<SelectItem> quantite = new ArrayList<SelectItem>();
	
	public Item(int idOption, String name, Double prix, int capaciteChambre) {
		this.name = name;
		this.prix = prix;
		this.idOption = idOption;
		// this.capaciteChambre = capaciteChambre +1;
		for(int i=0; i <= capaciteChambre+1; i++) {
			quantite.add(new SelectItem(i, String.valueOf(i)));
		}
	}
	
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public Double getPrix() {
		return prix;
	}

	public void setPrix(Double prix) {
		this.prix = prix;
	}

	public int getSelectedQuantite() {
		return selectedQuantite;
	}

	public void setSelectedQuantite(int selectedQuantite) {
		this.selectedQuantite = selectedQuantite;
	}

	public List<SelectItem> getQuantite() {
		return quantite;
	}

	public void setQuantite(List<SelectItem> quantite) {
		this.quantite = quantite;
	}

	public int getIdOption() {
		return idOption;
	}

	public void setIdOption(int idOption) {
		this.idOption = idOption;
	}
	
}